-
Notifications
You must be signed in to change notification settings - Fork 170
Add Imp tests to cover more cases of active/inactive committee #5466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
9ac443a to
5ee671e
Compare
5ee671e to
1d82e40
Compare
| coldCommitteeActive <- KeyHashObj <$> freshKeyHash | ||
| coldCommitteeInactive <- KeyHashObj <$> freshKeyHash | ||
| startingEpoch <- getsNES nesELL | ||
| maxTermLength <- getsPParams ppCommitteeMaxTermLengthL | ||
| (drep, _, _) <- setupSingleDRep 1_000_000_000 | ||
| (spo, _, _) <- setupPoolWithStake $ Coin 1_000_000_000 | ||
| let | ||
| committeeMap = | ||
| [ (coldCommitteeActive, addEpochInterval startingEpoch maxTermLength) | ||
| , (coldCommitteeInactive, addEpochInterval startingEpoch $ EpochInterval 5) | ||
| ] | ||
| initialCommittee <- getCommitteeMembers | ||
| committeeActionId <- | ||
| impAnn "Submit committee update" | ||
| . submitGovAction | ||
| $ UpdateCommittee | ||
| SNothing | ||
| initialCommittee | ||
| committeeMap | ||
| (1 %! 1) | ||
| submitYesVote_ (DRepVoter drep) committeeActionId | ||
| submitYesVote_ (StakePoolVoter spo) committeeActionId | ||
| passNEpochs 5 | ||
| getCommitteeMembers `shouldReturn` Map.keysSet committeeMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this part should be moved to its own function setupActiveAndInactiveCCMembers and then we can reuse it in the other tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make it parametrized on the threshold as well
48c98f2 to
2ed7407
Compare
2ed7407 to
886ac62
Compare
Description
"Committee proposals pass"to its proper placeRelated to #5418
Checklist
CHANGELOG.mdfiles updated for packages with externally visible changes.NOTE: New section is never added with the code changes. (See RELEASING.md).
.cabalandCHANGELOG.mdfiles when necessary, according to theversioning process.
.cabalfiles updated when necessary.NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
scripts/fourmolize.sh).scripts/cabal-format.sh).scripts/gen-cddl.sh)hie.yamlupdated (usescripts/gen-hie.sh).